![]() | Dialog Design for Mobile Devices | init(options) | ![]() |
This feature is only supported in the 'Javascript Web Browser Deployment' types.
The Javascript Web Browser Deployment supports tight integration of custom dialog controls allowing the developer to create new dialog controls based on the jQuery framework.
Starting Control Development
Create a new folder in your "Deployment Plugins" folder to hold your files. e.g. c:\Program Files\XpertRule\Deployment Plugins\Stars.
It's a good idea to copy an existing [reference] control from one of the other plugin folders. This should be a control who's functionality is nearest to that of your new control.
If you copied an existing control, rename the js and css files to the name of your new control (e.g. xrui-stars.js and xrui-stars.css).
If your control has any images, these should be placed in an "images" sub-folder off your new plugin folder e.g. Deployment Plugins\Stars\images.
Your new JS file will implement a jQuery plugin. You can read about jQuery plugins here.
Again, if you copied an existing control, rename the 2 references to the control name at the bottom of the file. The plugin name must be in the format "xrui_<control name>".
e.g.
$.fn.xrui_stars = function( method ) {
if( methods[method] ) {
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === "object" || ! method ) {
return methods.init.apply( this, arguments );
} else {
$.error( "Method " + method + " does not exist on jQuery.xrui_stars" );
}
};
n.b. This <control name> is the name used to reference your new control from the knowledge builder form editor.
Implementing Control Functionality
There are several standard methods which need to be implemented.